create table if not exists jms_dm.dm_problem_record_keywords_detail_dt(
     waybill_no                  varchar(50)     comment '运单'
    ,reply_time                  varchar(50)     comment '回复时间'
    ,reply_network_code          varchar(50)     comment '回复网点code'
    ,reply_network_name          varchar(50)     comment '回复网点名称'
    ,registration_network_name   varchar(50)     comment '登记网点code'
    ,registration_network_code   varchar(50)     comment '登记网点名称'
    ,registration_time           varchar(50)     comment '登记时间'
    ,message_keywords            varchar(1000)   comment '关键词'
    ,dt                          date NOT NULL   COMMENT "消息更新日期"
)
ENGINE=OLAP
DUPLICATE KEY(`waybill_no`, `reply_time`, `reply_network_code`)
COMMENT "拦截退转-问题件关键词"
PARTITION BY RANGE(`dt`)
(
    START ("2023-11-25") END ("2023-12-10") EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(`waybill_no`) BUCKETS 1
PROPERTIES (
  "replication_num" = "3",
  "dynamic_partition.enable" = "true",
  "dynamic_partition.time_unit" = "DAY",
  "dynamic_partition.time_zone" = "Asia/Shanghai",
  "dynamic_partition.start" = "-7",
  "dynamic_partition.end" = "3",
  "dynamic_partition.prefix" = "p",
  "dynamic_partition.buckets" = "1",
  "in_memory" = "false",
  "storage_format" = "V2",
  "enable_persistent_index" = "false"
);

